<div>
    <?
//    echo dirname(__FILE__);
    

    
    ?>
</div>

<ul class="modules_menu">
    <li class="page-li"><?=html::anchor("page/index", 'Home', array('class'=>"top-menu-icon home-icon",'title'=>'Home',));?></li>
    <li class="separator"></li>
<?foreach ($modules as $module):?>
    
    <?
    $class_name = str_replace(' ', '_', strtolower($module['name']));
    
    ?>
    
    
    <li class="module-li"><?=html::anchor($module['url'], $module['name'], array('class'=>"top-menu-icon {$class_name}-icon",'title'=>$module['name'],));?></li>
<!--    <li class="separator space"></li>-->
<? endforeach; ?>
    <li class="page-li"><?=html::anchor("sales/index", 'Sprzedaż', array('class'=>"top-menu-icon sales-icon",'title'=>'Sprzedaż',));?></li>
    <?if(Auth::hasRoles('admin') || Auth::hasRoles('manager')):?>
    <li class="separator"></li>
    <li class="page-li"><?=html::anchor("settings/index", 'Ustawienia', array('class'=>"top-menu-icon settings-icon",'title'=>'Ustawienia',));?></li>
    <?endif;?>
</ul>
<ul class="user_menu">
    <?
    

    ?>

    <?if(Auth::hasRoles('admin')):?>
    <li style="margin: 0 20px 0 20px;"><?=html::anchor('usermanagement/index', 'Użytkownicy', array())?></li>
    <li class=""></li>
    <?endif;?>
    
    <li>Witaj, <?=$user_data['username']?>! &nbsp;  <?=html::anchor('user/logout', 'Wyloguj', array('title'=>'Wyloguj',))?></li>
</ul>